<!DOCTYPE html>
<html>
  <head>
    <title>学生管理界面</title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body>
	<table border="1">
		<tr>
			<th>姓名</th>
			<th>学号</th>
			<th colspan="2">出勤</th>
		</tr>
		<% students.forEach(function(student,index){ %>
		<tr>
			<td><%= student.name %></td>
			<td><%= student.sid %></td>
			<td>
				
				<% if(student.Course){ student.Course.forEach(function(Course,index){ %>
				<tr><td>

					<tr><td>课程id：<%= Course.Course_id %></td></tr>
					<% Course.Attendance.forEach(function(attendance,index){ %>
					<% if(attendance){ %>
					<tr>			
						<td><%= attendance.times %></td>
						<td><%= attendance.here %></td>
					</tr>
					<% }}); %>
				</td></tr>
				<% });} %>
			</td> 
		</tr>
		<% }); %>

	</table>
	  <form action="/admin/student/qurey" method="post">
		  <h1>学生查询窗口</h1>
		  查询类型：<br/>
		  <input type="radio" name="qurey_type" value="sid" checked="true">id<br/>
		  <input type="radio" name="qurey_type" value="name">姓名<br/>
		  <input type="text" name="qurey_info" value="学生id或姓名"><br/>
		  <input type="submit" value="查询">
	</form>
	<form action="/admin/student/add" method="post">
		<h1>学生录入窗口</h1>
		姓名:<input type="text" name="name">
		学号:<input type="text" name="id">
		<input type="submit" value="添加">
	</form>

	<form action="/admin/student/attendance" method="post">
		<h1>学生出勤窗口</h1>
		学生学号:<input type="text" name="sid">
		课号:<input type="text" name="Course_id">
		课次:<input type="text" name="times">
		出勤:<input type="radio" name="here" value="true">到
		<input type="radio" name="here" value="false">不到
		<input type="submit" value="添加">
	</form>

  </body>
</html>
